[3.5] bpo-30458: Disallow control chars in http URLs. (GH-12755)#13207
Merged
larryhastings merged 4 commits intopython:3.5from Jul 14, 2019
Merged
[3.5] bpo-30458: Disallow control chars in http URLs. (GH-12755)#13207larryhastings merged 4 commits intopython:3.5from
larryhastings merged 4 commits intopython:3.5from
Conversation
Disallow control chars in http URLs in urllib.urlopen. This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected. Disable https related urllib tests on a build without ssl (pythonGH-13032) These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures. Use http.client.InvalidURL instead of ValueError as the new error case's exception. (pythonGH-13044) Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
Member
|
Multiple tests failed on AppVeyor: With TLS certification validation error: It seems like these failures are related to https://bugs.python.org/issue36816: PR #13200 isn't merged yet. |
Member
Travis CI basically has the same failures and so it's likely the same issue. |
vstinner
approved these changes
May 21, 2019
Member
vstinner
left a comment
There was a problem hiding this comment.
LGTM. Straightforward backport (cherry-pick). The patch went fine in all other branches.
Contributor
Author
|
Compared to 3.6, I've removed the f-strings. |
|
@larryhastings: Please replace |
Contributor
|
Thanks for the 3.5 love! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disallow control chars in http URLs in urllib.urlopen. This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected.
Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures.
Use http.client.InvalidURL instead of ValueError as the new error case's exception. (GH-13044)
Co-Authored-By: Miro Hrončok miro@hroncok.cz
https://bugs.python.org/issue30458